#! /usr/bin/env python
# -*- coding: utf-8 -*-
# Create by Albert_Chen
# CopyRight (py) 2017年 陈超. All rights reserved by Chao.Chen.
# Create on 2017-03-23

__author__ = 'Albert'

from flask import Flask, render_template
from jinja2 import Template

app = Flask(__name__)

@app.route('/', methods=['GET'])
def index():
    company = []
    with open('sitemap.txt') as file:

        for line in file.readlines():
            company.append({'url': line.strip().decode('utf8')})
    return render_template('index.html', company=company)

if __name__ == "__main__":
    app.run(debug=True)